{template modoer_header}
<div id="body">

    <div class="link_path">
        <em>共找到 <span class="font_2">$total</span> 个优惠券</em>
        <a href="{url modoer/index}">{lang global_index}</a>&nbsp;&raquo;&nbsp;{print implode('&nbsp;&raquo;&nbsp;', $urlpath)}
    </div>

    <div id="coupon_left">
		<div class="g-list-category">
			<div class="g-list-category-type">
                <h3>分类:</h3>
                <ul class="g-list-category-class">
                    <li$active[catid][0]><a href="{url coupon/index}">全部</a></li>
                    {get:coupon val=category()}
                    <li$active[catid][$val[catid]]><a href="{url coupon/index/catid/$val[catid]}">$val[name]</a></li>
                    {/get}
                </ul>
                <div class="clear"></div>
            </div>
        </div>
		<div class="subrail mt10">
			排序:
            <span$active[orderby][dateline]><a href="javascript:;" onclick="list_display('coupon_orderby','dateline')">最新发布</a></span>
            <span$active[orderby][pageview]><a href="javascript:;" onclick="list_display('coupon_orderby','pageview')">浏览量</a></span>
            <span$active[orderby][effect1]><a href="javascript:;" onclick="list_display('coupon_orderby','effect1')">最有用的</a></span>
            <span$active[orderby][comments]><a href="javascript:;" onclick="list_display('coupon_orderby','comments')">最多评论</a></span>
		</div>
        <div class="mainrail coupon-view">
            {dbres $list $val}
            <div class="il_coupon">
                <h3>[<a href="{url coupon/index/catid/$val[catid]}">$category[$val[catid]][name]</a>]&nbsp;<a href="{url coupon/detail/id/$val[couponid]}">$val[subject]</a></h3>
                <div class="thumb"><a href="{url coupon/detail/id/$val[couponid]}"><img src="{URLROOT}/$val[thumb]" alt="$val[subject]" /></a></div>
                <ul class="info">
                    <li class="full">商户：<a href="{url item/detail/id/$val[sid]}">$val[name]{if $val[subname]}($val[subname]){/if}</a></li>
                    <li>开始日期：{date $val[starttime], 'Y-m-d'}</li>
                    <li>截止日期：{date $val[endtime], 'Y-m-d'}</li>
                    <li class="full">现有<span class="font_2">$val[pageview]</span>次浏览，<span class="font_2">$val[comments]</span>个评论，其中有<span class="font_2">$val[effect1]</span>人认为有用</li>
                    <li class="full">优惠：$val[des]</li>
                </ul>
                <div class="clear"></div>
            </div>
            {/dbres}
            <!--{if $multipage}--><div class="multipage">$multipage</div><!--{/if}-->
            <!--{if !$total}-->
            <div class="messageborder">暂无数据。</div>
            <!--{/if}-->
        </div>

    </div>

    <div id="coupon_right">

		<div class="mainrail rail-border-3">
            <div class="mainrail">
                <div class="coupon-side-search">
                    <form method="get" action="{URLROOT}/coupon.php">
                        <input type="hidden" name="catid" value="$catid" />
                        <input type="text" name="keyword" class="t_input" value="$keyword" />&nbsp;
                        <button type="submit" class="button">搜索优惠券</button>
                    </form>
                </div>                
            </div>
            <div class="mainrail rail-h-bt-3">
                <h3 class="rail-h-2">最新发布</h3>
                <ul class="rail-list">
                    {get:coupon val=list_new(row/10/cachetime/1000)}
                    <li>
                        <cite>{date $val[dateline],'m-d'}</cite>
                        <a href="{url coupon/detail/id/$val[couponid]}" title="$val[subject]">{sublen $val[subject],12}</a>
                    </li>
                    {/get}
                </ul>
            </div>

            <div class="mainrail rail-h-bt-3">
                <h3 class="rail-h-2">最受关注</h3>
                <ul class="rail-list">
                    {get:coupon val=list_hot(row/10/cachetime/1000)}
                    <li>
                        <cite>$val[effect1]&nbsp;人有用</cite>
                        <a href="{url coupon/detail/id/$val[couponid]}" title="$val[subject]">{sublen $val[subject],12}</a>
                    </li>
                    {/get}
                </ul>
            </div>
		</div>
    </div>

    <div class="clear"></div>

</div>
<!--{eval footer();}-->